/*
 *接口编写处...
*如果接口需要做Action的权限验证，请在Action上使用属性
*如: [ApiActionPermission("Demo_Order",Enums.ActionPermissionOptions.Search)]
 */
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using VOL.Entity.DomainModels;
using VOL.Demo.IServices;
using VOL.Demo.IRepositories;
using Microsoft.EntityFrameworkCore;
using VOL.Core.Filters;
using VOL.Core.Enums;
using Microsoft.AspNetCore.Authorization;

namespace VOL.Demo.Controllers
{
    /// <summary>
    /// 退货订单
    /// </summary>
    [Route("api/Demo_Order_Return")]
    public class Demo_Order_ReturnController : Demo_OrderController
    {
        private readonly IDemo_OrderService _service;//访问业务代码
        private readonly IHttpContextAccessor _httpContextAccessor;

        private readonly IDemo_GoodsService _goodsService;//商品信息业务类

        private readonly IDemo_OrderListRepository _orderListRepository;

        [ActivatorUtilitiesConstructor]
        public Demo_Order_ReturnController(
            IDemo_OrderService service,
            IHttpContextAccessor httpContextAccessor,
            IDemo_GoodsService goodsService,
            IDemo_OrderListRepository orderListRepository
        )
        : base(service)
        {
            _service = service;
            _goodsService = goodsService;
            _orderListRepository = orderListRepository;
            _httpContextAccessor = httpContextAccessor;
        }

        public override ActionResult GetPageData([FromBody] PageDataOptions loadData)
        {
            loadData.Value = 3;
            return base.GetPageData(loadData);
        }
        public override ActionResult Export([FromBody] PageDataOptions loadData)
        {
            loadData.Value = 3;
            return base.Export(loadData);
        }
    }
}
